<div class="yiiForm">

<?php $this->widget('application.components.RequiredMessage'); ?>

<?php echo CHtml::beginForm(); ?>

<?php echo CHtml::errorSummary($model); ?>

<?php
$opts = array (
	'size' => 10,
	'maxlength' => 5
);
if ($update)
	$opts['readonly'] = '1';
echo CHtml::activeHiddenField($model, 'id', $opts);
?>

<div class="simple">
<?php echo CHtml::activeLabelEx($model,'label'); ?>
<?php echo CHtml::activeTextField($model,'label',array('size'=>50,'maxlength'=>50)); ?>
</div>

<div class="action">
<?php echo CHtml::submitButton($update ? Yii::t('views','Save') : Yii::t('views','Create')); ?>
</div>

<?php echo CHtml::endForm(); ?>

</div><!-- yiiForm -->